<template>
    <div v-drag="[]" class="video-container">
        <el-tooltip
            class="item"
            effect="dark"
            content="这里是开启摄像头的窗口哦，你可以拖动该窗口"
            placement="top-start"
        >
            <video ref="video" class="video"></video>
        </el-tooltip>
    </div>
</template>

<script lang="ts" setup>
import vDrag from '../../directives/vDrag'
import { ref, Ref, defineExpose } from 'vue'
const video: Ref<HTMLVideoElement | null> = ref(null)
defineExpose({
    video
})
</script>

<style lang="scss" scoped>
.video-container {
    position: fixed;
    bottom: 20px;
    right: 20px;

    .video {
        transition: all 0.3s;

        &:hover {
            background-color: #000;
        }
    }
}
</style>
